<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script src="../js/vue.js"></script>
    </head>
    <body>
        <div id="container">
            用户名:<input type="text" :value="username" @input="ipt"  />
        </div>
        <script>
           var vm=new Vue({
               el:"#container",
               data:{
                   username:""
               },
               methods:{
                   ipt:function(event){
                       console.log(">>>>"+event.target.value)
                       this.username=event.target.value;
                   }
               }
           });
        </script>
    </body>
</html>
